package com.boomsecret.pattern.observer;

/**
 * Created by wangjinliang on 2018/1/24.
 */
public class ObserverPatternDemo {
    public static void main(String[] args) {
        Platform platform = new Platform();
        Observer tom = new WeiXinUser("tom");
        WeiXinUser jack = new WeiXinUser("jack");
        platform.attach(tom);
        platform.attach(jack);
        platform.notifyMsg();

        platform.detach(jack);
        platform.notifyMsg();
    }
}
